package NovelBar.service;

import NovelBar.entity.Notice;
import NovelBar.mapper.NoticeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeService {
    @Autowired
    private NoticeMapper noticeMapper;

    public List<Notice> loadAllNotice() {
        return noticeMapper.loadAllNotice();
    }

    public void insertNotice(Notice notice) {
        noticeMapper.insertNotice(notice);
    }

    public void deleteNoticeById(Integer id) {
        noticeMapper.deleteNoticeById(id);
    }
    public void updateNotice(Notice notice) {
        noticeMapper.updateNotice(notice);
    }
}

